
using System;
using ScrewTurn.Wiki.PluginFramework;

namespace ScrewTurn.Wiki {

	/// <summary>
	/// Contains extended information about a Page.
	/// </summary>
	public class ExtendedPageInfo {

		private PageInfo pageInfo;
		private string title, user;
		private DateTime dateTime;
		private int messageCount;

		/// <summary>
		/// Initializes a new instance of the <b>ExtendedPageInfo</b> class.
		/// </summary>
		/// <param name="pageInfo">The PageInfo object.</param>
		/// <param name="title">The Title of the Page.</param>
		/// <param name="dateTime">The Date/Time.</param>
		/// <param name="user">The User.</param>
		public ExtendedPageInfo(PageInfo pageInfo, string title, DateTime dateTime, string user) {
			this.pageInfo = pageInfo;
			this.title = title;
			this.dateTime = dateTime;
			this.user = user;
			this.messageCount = Pages.Instance.GetMessageCount(pageInfo);
		}

		/// <summary>
		/// Gets the PageInfo object.
		/// </summary>
		public PageInfo PageInfo {
			get { return pageInfo; }
		}

		/// <summary>
		/// Gets the Title of the Page.
		/// </summary>
		public string Title {
			get { return title; }
		}

		/// <summary>
		/// Gets the Date/Time.
		/// </summary>
		public DateTime DateTime {
			get { return dateTime; }
		}

		/// <summary>
		/// Gets the User.
		/// </summary>
		public string User {
			get { return user; }
		}

		/// <summary>
		/// Gets the number of Messages.
		/// </summary>
		public int MessageCount {
			get { return messageCount; }
		}

	}

}
